<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>订单详情</title>
    <link rel="stylesheet" href="{{URL::asset('layui/css/layui.css')}}"/>
    <link rel="stylesheet" href="{{URL::asset('css/admin1.css')}}"/>
</head>
<body>

<fieldset class="layui-elem-field site-demo-button">
    <legend>订单信息</legend>
    <table class="layui-table layui-table-add" lay-skin="nob">
        <tbody>
        <tr>
            <th width="100" class="pad">订单编号</th>
            <td>{{$order['order_sn']}}</td>
        </tr>
        <tr>
            <th class="pad">订单金额</th>
            <td>￥{{$order['goods_amount']}}</td>
        </tr>
        <tr>
            <th class="pad">支付金额</th>
            <td>￥{{$order['pay_amount']}}</td>
        </tr>
        <tr>
            <th class="pad">商品数量</th>
            <td>{{$order['goods_num']}}件</td>
        </tr>
        <tr>
            <th class="pad">订单状态</th>
            @if($order['order_status']==0)
                <td><span class="layui-badge layui-bg-blue">待支付</span></td>
            @elseif($order['order_status']==1)
                <td><span class="layui-badge">待发货</span></td>
            @elseif($order['order_status']==2)
                <td><span class="layui-badge layui-bg-orange">待签收</span></td>
            @elseif($order['order_status']==3)
                <td><span class="layui-badge layui-bg-gray">已签收</span></td>
            @elseif($order['order_status']==4)
                <td><span class="layui-badge layui-bg-green">已评价</span></td>
            @elseif($order['order_status']==7)
                <td><span class="layui-badge-rim">已退款</span></td>
            @elseif($order['order_status']==-1)
                <td><span class="layui-badge-rim">已取消</span></td>
            @endif
        </tr>
        <tr>
            <th class="pad">交易时间</th>
            <td>{{$order['order_time']}}</td>
        </tr>
        <tr>
            <th class="pad">支付时间</th>
            <td>{{$order['pay_time']}}</td>
        </tr>
        <tr>
            <th class="pad">发货时间</th>
            <td>{{$order['send_time']}}</td>
        </tr>
        <tr>
            <th class="pad">签收时间</th>
            <td>{{$order['finish_time']}}</td>
        </tr>
        </tbody>
    </table>
</fieldset>

<fieldset class="layui-elem-field site-demo-button">
    <legend>物流信息</legend>
    <table class="layui-table layui-table-add" lay-skin="nob">
        <tbody>
        <tr>
            <th width="100" class="pad">物流公司</th>
            <td>{{$order['express_company']}}</td>
        </tr>
        <tr>
            <th class="pad">物流单号</th>
            <td>{{$order['express_code']}}</td>
        </tr>
        </tbody>
    </table>
</fieldset>

<fieldset class="layui-elem-field site-demo-button">
    <legend>会员信息</legend>
    <table class="layui-table layui-table-add" lay-skin="nob">
        <tbody>
        <tr>
            <th width="100" class="pad">会员ID</th>
            <td>{{$order['user']['id']}}</td>
        </tr>
        <tr>
            <th class="pad">会员昵称</th>
            <td>{{$order['user']['nickname']}}</td>
        </tr>
        <tr>
            <th class="pad">真实姓名</th>
            <td>{{$order['user']['username']}}</td>
        </tr>
        <tr>
            <th class="pad">手机号码</th>
            <td>{{$order['user']['phone']}}</td>
        </tr>
        </tbody>
    </table>
</fieldset>

<fieldset class="layui-elem-field site-demo-button">
    <legend>收货地址</legend>
    <table class="layui-table layui-table-add" lay-skin="nob">
        <tbody>
        <tr>
            <th width="100" class="pad">收货人</th>
            <td>{{$order['username']}}</td>
        </tr>
        <tr>
            <th class="pad">手机号码</th>
            <td>{{$order['phone']}}</td>
        </tr>
        <tr>
            <th class="pad">收货地址</th>
            <td>{{$order['address']}}</td>
        </tr>
        </tbody>
    </table>
</fieldset>

<fieldset class="layui-elem-field layui-field-title mtb10">
    <legend>商品信息</legend>
</fieldset>
<table class="layui-table" lay-skin="line">
    <thead>
    <tr>
        <th>商品图片</th>
        <th>商品名称</th>
        <th>商品规格</th>
        <th>商品颜色</th>
        <th>商品单价</th>
        <th>交易数量</th>
    </tr>
    </thead>
    <tbody>
    @foreach($order['orderGoods'] as $item)
        <tr>
            <!-- 点击进入前台对应商品页面 -->
            <td width="66" class="a3"><img class="img-cp" src="{{$item['goods_image']}}" alt=""></td>
            <td>{{$item['goods_name']}}</td>
            <td>{{$item['sku_name']}}</td>
            <td>{{$item['color_name']}}</td>
            <td><span class="price">{{$item['sku_price']}}</span></td>
            <td><span>x{{$item['goods_num']}}</span></td>
        </tr>
    @endforeach
    </tbody>
</table>

<script type="text/javascript" src="{{URL::asset('layui/layui.js')}}"></script>
<script>
    layui.use(['jquery','form'], function(){
        var $ = layui.jquery;
    });
</script>

</body>
</html>
